import React from 'react'
import { Link, NavLink } from 'react-router-dom'

export default function Menu() {
  return (
    <div>
      <ul>
        <li>
          <Link to="/">主页</Link>
        </li>
        <li>
          <Link to="/about">关于</Link>
        </li>
        <li>
          <NavLink to="/student" style={({ isActive }) => {
            return isActive ? {
              backgroundColor: 'yellow'
            } : {}
          }}>学生</NavLink>
        </li>
      </ul>
    </div>
  )
}
